package com.lsp.server.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.lsp.server.user.domain.po.UserEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.data.repository.query.Param;

import java.util.List;

/**
 * @ClassName UserMapper
 * @Description 用户持久化接口
 * @Author Mr Hao
 * @Date 2021/11/14 18:16
 */
@Mapper
public interface UserMapper{

    List<UserEntity> getUser();

    void addUser(UserEntity user);

    UserEntity login(String name);

    void upateUesr(UserEntity form);

    UserEntity findUserById(String id);

    void delUserById(String ids);

    void updateUserPassByUserEmail(UserEntity user);

    @Select("select * from t_user where name = #{name} ")
    UserEntity userExistsByName(String name);
}
